<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/bootstrap.min.css%>">
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/live2d.css%>">
    <link rel="stylesheet" href="<%= themeConfig.domain %>/styles/main.css">
    <meta name="description" content="<%- site.customConfig.metaDescription || themeConfig.siteDescription %>" />
    <link rel="stylesheet" href="<%= themeConfig.domain %>/media/css/font-awesome.css%>">
    <title><%- themeConfig.siteName %></title>
</head>
<body>
    <div id="content">
        <div class="nav-large">
            <div class="row">
                <!--------------- pc端菜单栏👇 ---------------->
                <div class="side"><%- include('./includes/side') %></div>
                <!--------------- pc端菜单栏👆 ---------------->
                <!----------- 移动端导航栏👇 ----------------->
                <div class="mobilebar"><%- include('./includes/bar') %>
                <!----------- 移动端导航栏👆 ----------------->
                </div>
                <!-- ----------------左侧菜单栏html 👇-------------------------------------->
                <% if(site.customConfig.menuposition == 'left'){ %>
                <div id="tab1" class="tab">
                    <div class="bars">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                    <div class="close"></div>
                </div>
                <div class="col-md-1 col-lg-3"></div>
                <div id="main" class="col-xs-12 col-sm-12 col-md-12 col-lg-7">
                    <%- include('./includes/friends-detail') %>
                    <div id="comment" class="comment" >
                        <div class="commentcontainer">
                            <%if(site.customConfig.commentschoice=='valine'){%>
                                <% if (site.customConfig.Leancloud_appId && site.customConfig.Leancloud_key) { %>
                                    <%- include('./includes/valine') %>
                                    <div class="clear"></div>
                                <%}else{%>
                                    <p>请到客户端“主题--自定义配置--配置”中填入leancloud_appID和key</p>
                                <%}%>
                            <%}else if(site.customConfig.commentschoice=='twikoo'){%>
                                <%if(site.customConfig.twikoo_id){%>
                                    <%- include('./includes/twikoo') %>
                                    <div class="clear"></div>
                                <%}else{%>
                                    <p>请到客户端“主题--自定义配置--配置”中填入cloudbase环境id</p>
                                <%}%>
                            <%}else if(site.customConfig.commentschoice=='default'){%>
                                <%if ( typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
                                    <% if (commentSetting.commentPlatform === 'gitalk') { %>
                                        <%- include('./includes/gitalk') %>
                                    <% } %>
                                    <% if (commentSetting.commentPlatform === 'disqus') { %>
                                        <%- include('./includes/disqus') %>
                                    <% } %>
                                <% } %>
                            <%}%>
                        </div>
                    </div>
                </div>
                <div class="col-md-1 col-lg-1"></div>
                <div id="bg">
                </div>
            </div>
            <!-- ----------------左侧菜单栏html 👆-------------------------------------->
            <!------------------ 顶部菜单栏html👇--------->
            <% }else{ %>
                <div class="col-md-2 col-lg-3"></div>
                <div id="main" class="col-xs-12 col-sm-12 col-md-12 col-lg-6 posttop">
                    <%- include('./includes/friends-detail') %>
                    <div class="tog">
                        <div class="toggleContainer">
                            <div class="toggle">
                                <i class="fas fa-angle-double-up"></i>
                            </div>
                        </div>
                    </div>
                    <div id="comment" class="comment">
                        <div class="commentcontainer">
                            <%if(site.customConfig.commentschoice=='valine'){%>
                                <% if (site.customConfig.Leancloud_appId && site.customConfig.Leancloud_key) { %>
                                    <%- include('./includes/valine') %>
                                    <div class="clear"></div>
                                <%}else{%>
                                    <p>请到客户端“主题--自定义配置--配置”中填入leancloud_appID和key</p>
                                <%}%>
                            <%}else if(site.customConfig.commentschoice=='twikoo'){%>
                                <%if(site.customConfig.twikoo_id){%>
                                    <%- include('./includes/twikoo') %>
                                    <div class="clear"></div>
                                <%}else{%>
                                    <p>请到客户端“主题--自定义配置--配置”中填入cloudbase环境id</p>
                                <%}%>
                            <%}else if(site.customConfig.commentschoice=='default'){%>
                                <%if ( typeof commentSetting !== 'undefined' && commentSetting.showComment) { %>
                                    <% if (commentSetting.commentPlatform === 'gitalk') { %>
                                        <%- include('./includes/gitalk') %>
                                    <% } %>
                                    <% if (commentSetting.commentPlatform === 'disqus') { %>
                                        <%- include('./includes/disqus') %>
                                    <% } %>
                                <% } %>
                            <%}%>
                        </div>
                    </div>
                    <div style="display: none;">
                        <%if(site.customConfig.menuposition=='top'){%>
                            <%- include('./includes/footer') %>
                            <%}%>
                    </div>
                </div>
                <div class="col-md-2 col-lg-3">
                </div>
            <div id="bg">
            </div>
        </div>
        <% } %>
        <!------------------ 顶部菜单栏html👆--------->
        <%if(site.customConfig.aplayerchoice){%>
        <%- include('./includes/aplayer') %>
        <%}%>

    </div>
    
    <div class="tog">
        <div class="toggleContainer">
            <div class="toggle">
                <i class="fas fa-angle-double-up"></i>
            </div>
        </div>
    </div>
    <div id="bgchoice" style="display: none"><%= site.customConfig.bgchoice %></div>
    <% if(site.customConfig.bgchoice == 'default'){ %>
    <div id="bgurl" style="display:none"><%= site.customConfig['bgimage'] %></div>
    <% } else{ %>
    <div id="bgurl" style="display:none"><%= site.customConfig['bgimagelink'] %></div>
    <% } %>
    </div>
    <div id="landlord">
        <div class="message" style="opacity:0"></div>
        <canvas id="live2d" width="240" height="250" class="live2d"></canvas>
    </div>
    <div id="domainname" style="display:none"><%= themeConfig.domain %></div>
</body>
</html>

<!-------------------- live2d功能👇 --------------------------->
<%if (site.customConfig.live2d){ %>
<script type="text/javascript">
    var message_Path = '/live2d/'
    var home_Path = document.getElementById("domainname").innerHTML+"/"; //此处修改为你的域名，必须带斜杠
</script>
<script type="text/javascript" src="<%= themeConfig.domain %>/media/js/live2d.js%>"></script>
<script type="text/javascript" src="<%= themeConfig.domain %>/media/live2d/js/message.js%>"></script>
<script type="text/javascript">
    loadlive2d("live2d", "<%= themeConfig.domain %>/media/live2d/assets/tororo.model.json%>");
</script>
<%}%>
<!-------------------- live2d功能👆 --------------------------->

<!------------ 加载全局背景图功能👇（开始时没有写好，这功能有点鸡肋/(ㄒoㄒ)/~~） -->
<script>
        var bgchoice=$('#bgchoice').html();
        var bg = $('#bg');
        var bgurl = document.getElementById("bgurl").innerHTML;
        if(bgchoice=='default')
            for (var i = 0; i < 3; i++)
                bgurl = bgurl.replace("\\", "/");
        bg.css("background", "url('" + bgurl + "')");

        window.onload = function(){
            aplayerbtnInit();
        }
</script>
<!------------ 加载全局背景图功能👆（开始时没有写好，这功能有点鸡肋/(ㄒoㄒ)/~~） -->
<%if (site.customConfig.menuposition=='left'){ %>
    <script src="<%= themeConfig.domain %>/media/js/index.js%>"></script>
<%}%>